package tecpointbenchmark.model.modules;

public class RAMthread implements Runnable{

    private boolean continueBenchmarking;
    private RAMModule master = null;
    
	RAMthread(RAMModule master){
		this.master=master;
	}

	@Override
	public void run() {
		continueBenchmarking = true;
		long[][] m = new long[10][3];
		while (continueBenchmarking) {
			for (int i = 0; i<100;i++)
			{
            m[0][0] += 1;
            m[4][1] += 1;
            m[9][2] += 1;
			}
			master.setScore(m[0][0] + m[4][1] + m[9][2]);
		}
	}
	
    public void setContinueBenchmarking(boolean b) {
        this.continueBenchmarking = b;
        //System.out.print("stop!\n");
    }
}
